package com.atguigu.tingshu.album.client;

import com.atguigu.tingshu.album.client.impl.TrackInfoDegradeFeignClient;
import com.atguigu.tingshu.common.result.Result;
import com.atguigu.tingshu.model.album.AlbumInfo;
import com.atguigu.tingshu.model.album.TrackInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * <p>
 * 产品列表API接口
 * </p>
 *
 * @author qy
 */
@FeignClient(value = "service-album", fallback = TrackInfoDegradeFeignClient.class)
public interface TrackInfoFeignClient {

    // 远程调用根据id获取声音的基本信息
    // api/album/trackInfo/getTrackInfo/{id}
    // @Operation(summary = "获取声音信息")
    @GetMapping("api/album/trackInfo/getTrackInfoInner/{id}")
    public Result<TrackInfo> getTrackInfoInner(@PathVariable Long id);

    // 远程调用获取需要购买的专辑声音
    // api/album/trackInfo/getNeedTrackInfoList/{albumId}/{trackNo}/{count}
    // @Operation(summary = "获取需要购买的专辑声音列表")
    @GetMapping("api/album/trackInfo/getNeedTrackInfoList/{albumId}/{trackNo}/{count}")
    public Result<List<TrackInfo>> getNeedTrackInfoList(@PathVariable Long albumId,
                                       @PathVariable Long trackNo,
                                       @PathVariable Integer count) ;
}